When receiving data (packet) from a network, a network control section (network controller) of a computer connecting to the network directly stores the received packet in a data storage section (ring buffer), and notifies a CPU of an interrupt.
When receiving the interrupt notification of the network controller, the CPU executes an interrupt handler of a network driver registered in an operating system (OS). The interrupt handler of the driver checks the ring buffer, and processes the packet stored in the ring buffer.
A method for processing the packet of the ring buffer by the network driver includes the following two types.
1. A method for processing the ring buffer only by the interrupt (interrupt method)
In the interrupt method, the network driver checks the ring buffer for every interrupt notification of the network controller, and processes the stored packet.
2. A method for processing the ring buffer by polling (polling method)
In the polling method, the network driver periodically checks the ring buffer, and when the ring buffer includes the packet, the network driver processes the included packet.
For example, the network driver suppresses an interrupt notifying function of the network controller for the first interrupt notification, after that, the network driver periodically checks the ring buffer, and processes the included packet. When the ring buffer is periodically checked, and when the packet is not included, the interrupt notifying function of the network controller is caused to be available, and the periodical checking is stopped.
As an opportunity for the periodical checking for the ring buffer, the following one or a plurality of timings are used.
(1) timer: the ring buffer is checked every certain time based on time monitoring by a timer.
(2) interrupt of another driver: the ring buffer is checked after it is completed to process the interrupt of another driver.
(3) a low priority daemon program: when a priority is set to a program, a low priority daemon program is provided, and the ring buffer is checked when the CPU is assigned to the daemon program.    Patent Document 1: Japanese Laid-Open Patent Publication No. 07-49822
The conventional data processing for the ring buffer includes the following problems.
(1) In the above interrupt method, when the network controller continuously receives a lot of the packets, that is, the network is highly loaded, the interrupt notification of the network controller frequently occurs, and the CPU is occupied by network processing of the network driver. As a result, another application program becomes unable to operate, and an original service of the system becomes unable to be provided.
(2) In the conventional polling method, because the data processing is executed by the polling, even when the network is highly loaded, such a state is not induced that the interrupt of the network driver frequently occurs. However, when the number of the packets received in a polling interval exceeds the number of the packets which can be stored in the ring buffer, the exceeding packets are discarded.
The following problems are induced because of methods for specifying the polling opportunity.
(2-1) When the polling opportunity is specified by the timer, latency (delay time) until the network driver processes the packet received by the network controller needs up to a timer interval time. Thus, processing timing of the network driver can not be advanced, so that performance of the original service of the system is degraded.
When the timer interval time is shortened, in the case of the network high load, such a state is induced that the network driver occupies the CPU, the application program becomes unable to operate, and the original service of the system is not provided.
(2-2) When the polling opportunity is specified by the interrupt of another driver, the interrupt of another driver is issued in an irregular interval, so that the latency until the network driver processes the packet received by the network controller can not be forecasted. Thus, in some state that the interrupt of another driver occurs, the performance of the original service of the system may be degraded.
Further, when the interrupts of another driver are many, another driver and the network driver occupy the CPU, the application program becomes unable to operate, and the original service of the system becomes unable to be provided.
(2-3) When the polling opportunity is specified by the low priority daemon program, because another application programs mostly continue to use the CPU, such a state is induced that the CPU is not assigned to the low priority daemon program. Thus, the daemon program is not initiated, and the packet received by the network driver can not be processed, so that the original service of the system becomes unable to be provided.
As described above, when such a state that a lot of the application program drivers use the CPU, and such a state that the network is highly loaded, and the network driver uses the CPU occur at the same time, in the conventional method, any processing for the application program and the network driver is sacrificed. Thus, such a problem is included that the original service of the system becomes can not be provided on the whole system.